package service;


import java.util.*;

import beans.*;
import db.*;

public class signService {
	
	public List<signBean> browse(){
		signDAO dao =new signDAO();
		return dao.getAllRecords();
	}
	
	public boolean addsign(signBean sign)
	{
		signDAO signDao=new signDAO();
		return signDao.insertRecord(sign);
	}
	
	public signBean getRecord(int signId)
	{
		signDAO signDao=new signDAO();
		return signDao.getRecord(signId);
	}
	
	public int delsign(signBean sign)
	{
		signDAO signDao=new signDAO();
		if(signDao.deleteRecord(sign))
			return 1;
		else
			return 2;
	}
	
	public int updatesign(signBean beforeRecord,signBean afterRecord)
	{
		signDAO signDao=new signDAO();
		if(signDao.updateRecord(beforeRecord,afterRecord))
			return 1;
		else
			return 2;
	}
}
